#pragma once
#include<iostream>
#include<pthread.h>
class Mutex
{
public:
    Mutex(pthread_mutex_t*lock):_lock(lock)
    {
        pthread_mutex_lock(_lock);
    }
    ~Mutex()
    {
        pthread_mutex_unlock(_lock);
    }
private:
    pthread_mutex_t*_lock;
};